<template>
  <div class="require-review">
    <div class="drawer-wrap" :class="{ disabled: !editable }" v-loading="loading">
      <div class="drawer-content tag-scrollbar">
        <el-form :model="editForm" label-width="0" :rules="editFormRules" ref="editForm">
          <el-row :gutter="20">
            <el-col :span="12" :offset="6">
              <div class="tag-name">
                <div class="star"></div>
                <el-form-item prop="tagNm">
                  <el-select
                    v-model="editForm.tagId"
                    filterable
                    remote
                    :remote-method="getTagNm"
                    v-if="drawerType === 'add' && changeTag"
                  >
                    <el-option
                      v-for="item in tagList"
                      :key="item.tagId"
                      :label="item.tagNm"
                      :value="item.tagId"
                    ></el-option>
                  </el-select>
                  <el-input
                    placeholder="请输入标签名称"
                    v-model="editForm.tagNm"
                    :disabled="!editable"
                    v-else
                  ></el-input>
                </el-form-item>
              </div>
            </el-col>
            <el-col :span="6" align="right">
              <el-switch v-model="changeTag" inactive-text="新增标签" active-text="标签改造" disabled></el-switch>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <div class="row1 clearfix">
                <div class="star"></div>
                <div class="row1-left linear-purpose">
                  <icon-svg name="iconHq"></icon-svg>
                  统计粒度
                </div>
                <div class="row1-content hq-content">
                  <el-form-item prop="hqTag">
                    <el-radio-group v-model="editForm.hqTag" :disabled="!editable" class="tag-scrollbar">
                      <el-radio v-for="item in $dictList('is_hq_tag')" :key="item.key" :label="item.key">
                        {{ item.value }}
                      </el-radio>
                    </el-radio-group>
                  </el-form-item>
                </div>
              </div>
            </el-col>
            <el-col :span="12">
              <div class="row1 clearfix">
                <div class="star"></div>
                <div class="row1-left linear-purpose">
                  <icon-svg name="iconClient"></icon-svg>
                  客户统计范围
                </div>
                <div class="row1-content hq-content">
                  <el-form-item prop="clientStatRange">
                    <el-radio-group v-model="editForm.clientStatRange" :disabled="!editable" class="tag-scrollbar">
                      <el-radio v-for="item in $dictList('client_stat_range')" :key="item.key" :label="item.key">
                        {{ item.value }}
                      </el-radio>
                    </el-radio-group>
                  </el-form-item>
                </div>
              </div>
            </el-col>
            <el-col :span="12">
              <div class="row1 clearfix">
                <div class="star"></div>
                <div class="row1-left linear-blue">
                  <icon-svg name="iconKind"></icon-svg>
                  标签类别
                </div>
                <div class="row1-content">
                  <el-form-item prop="tagKind">
                    <el-radio-group v-model="editForm.tagKind" :disabled="!editable" class="tag-scrollbar">
                      <el-radio v-for="item in $dictList('tag_kind')" :key="item.key" :label="item.key">
                        {{ item.value }}
                      </el-radio>
                    </el-radio-group>
                  </el-form-item>
                </div>
              </div>
            </el-col>
            <el-col :span="12">
              <div class="row1 clearfix">
                <div class="star"></div>
                <div class="row1-left linear-blue">
                  <icon-svg name="iconRequirePlatform"></icon-svg>
                  上线平台
                </div>
                <div class="row1-content">
                  <el-form-item prop="appPlfmIds">
                    <el-select v-model="editForm.appPlfmIds" multiple :disabled="!editable">
                      <el-option
                        v-for="item in platforms"
                        :key="item.appPlfmId"
                        :label="item.appPlfmNm"
                        :value="item.appPlfmId.toString()"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </div>
              </div>
            </el-col>
            <el-col :span="12">
              <div class="row1 clearfix">
                <div class="star"></div>
                <div class="row1-left linear-green">
                  <icon-svg name="iconResTeam"></icon-svg>
                  责任团队
                </div>
                <div class="row1-content">
                  <el-form-item prop="respTeamId">
                    <el-select v-model="editForm.respTeamId" disabled>
                      <el-option label="---" value=""></el-option>
                      <el-option
                        v-for="item in depts"
                        :key="item.deptId"
                        :label="item.deptNm"
                        :value="item.deptId"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </div>
              </div>
            </el-col>
            <el-col :span="12">
              <div class="row1 clearfix">
                <div class="row1-left linear-green">
                  <icon-svg name="iconResponse"></icon-svg>
                  责任人
                </div>
                <div class="row1-content">
                  <el-form-item prop="responserId">
                    <el-select v-model="editForm.responserId" disabled filterable clearable>
                      <el-option label="---" value=""></el-option>
                      <el-option
                        v-for="item in responsers"
                        :key="item.userId"
                        :label="$name(item)"
                        :value="item.userId"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </div>
              </div>
            </el-col>
            <el-col :span="12">
              <div class="row1 clearfix">
                <div class="star"></div>
                <div class="row1-left linear-cyan">
                  <icon-svg name="iconMount"></icon-svg>
                  唯一标识
                </div>
                <div class="row1-content">
                  <el-form-item prop="identifierFlag">
                    <el-switch
                      v-model="editForm.identifierFlag"
                      active-color="#13ce66"
                      :active-value="1"
                      :inactive-value="0"
                      active-text="是"
                      inactive-text="否"
                      :disabled="!editable"
                    ></el-switch>
                  </el-form-item>
                </div>
              </div>
            </el-col>
            <el-col :span="12">
              <div class="row1 clearfix">
                <div class="row1-left linear-cyan">
                  <icon-svg name="iconResponse"></icon-svg>
                  提出人
                </div>
                <div class="row1-content">
                  <el-form-item prop="requirerNm">
                    <span class="require-name">
                      {{ $name(editForm, 'requirerNnm', 'requirerNm') }}
                    </span>
                  </el-form-item>
                </div>
              </div>
            </el-col>
            <el-col :span="12">
              <div class="row1 clearfix">
                <div class="star"></div>
                <div class="row1-left linear-red">
                  <icon-svg name="iconRequireDt"></icon-svg>
                  计划排版
                </div>
                <div class="row1-content hq-content">
                  <el-form-item prop="requireScheduleDt">
                    <el-date-picker
                      v-model="editForm.requireScheduleDt"
                      placeholder="选择日期"
                      type="month"
                      value-format="yyyy-MM"
                      :disabled="!editable"
                    ></el-date-picker>
                  </el-form-item>
                </div>
              </div>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="24">
              <div class="card row2">
                <div class="star"></div>
                <div class="title">
                  <icon-svg name="iconStory"></icon-svg>
                  <div>
                    标签故事
                    <el-tooltip
                      effect="dark"
                      content="示例：根据考核口径客户开卡首次动账后计入当年新获客，作为中后台人员，我希望在新户百日线上经营中以客户首次动账作为起点进入新户客户旅程，以避免有限的线上触达资源浪费"
                      placement="top"
                      popper-class="require-tooltip"
                    >
                      <i class="el-icon-info"></i>
                    </el-tooltip>
                  </div>
                </div>
                <div class="content blue">
                  <el-form-item prop="tagStory">
                    <el-input
                      placeholder="请输入标签故事"
                      v-model="editForm.tagStory"
                      type="textarea"
                      :maxlength="1000"
                      :rows="5"
                      :show-word-limit="true"
                      :disabled="!editable"
                    ></el-input>
                  </el-form-item>
                </div>
              </div>
            </el-col>
            <el-col :span="24">
              <div class="card row2">
                <div class="star"></div>
                <div class="title">
                  <icon-svg name="iconBizstmt"></icon-svg>
                  <div>
                    业务口径
                    <el-tooltip
                      effect="dark"
                      content="示例：新户首次动账日期：按一级分行本部/二级分行统计客户最早一次动账的日期，包括主动动账和被动动账"
                      placement="top"
                      popper-class="require-tooltip"
                    >
                      <i class="el-icon-info"></i>
                    </el-tooltip>
                  </div>
                </div>
                <div class="content blue">
                  <el-form-item prop="bizStmt">
                    <el-input
                      placeholder="请输入业务口径"
                      v-model="editForm.bizStmt"
                      type="textarea"
                      :maxlength="1000"
                      :rows="5"
                      :show-word-limit="true"
                      :disabled="!editable"
                    ></el-input>
                  </el-form-item>
                </div>
              </div>
            </el-col>
            <el-col :span="24">
              <div class="card row2">
                <div class="title">
                  <icon-svg name="iconItstmt"></icon-svg>
                  <div>
                    技术口径
                    <el-tooltip
                      effect="dark"
                      content="示例：时点AUM首次>=0的日期"
                      placement="top"
                      popper-class="require-tooltip"
                    >
                      <i class="el-icon-info"></i>
                    </el-tooltip>
                  </div>
                </div>
                <div class="content blue">
                  <el-form-item prop="itStmt">
                    <el-input
                      placeholder="请输入技术口径"
                      v-model="editForm.itStmt"
                      type="textarea"
                      :maxlength="3000"
                      :rows="5"
                      :show-word-limit="true"
                      :disabled="!editable"
                    ></el-input>
                  </el-form-item>
                </div>
              </div>
            </el-col>
          </el-row>
          <div class="info" v-if="tagInfo.requireStatusList.length">
            <div class="content-divider second">
              <div class="clearfix">
                <div class="number">01</div>
                <div class="divider-title">标签状态<br />Tag status</div>
                <div class="bg"></div>
              </div>
            </div>
            <ul class="tag-status-list">
              <li v-for="(item, index) in tagInfo.requireStatusList" :key="index">
                <el-row :gutter="20">
                  <el-col :span="5">{{ $name(item, 'handlerNnm', 'handlerNm') }}</el-col>
                  <el-col :span="5">{{ item.nodeNm }}</el-col>
                  <el-col :span="7">{{ item.procTm }}</el-col>
                  <el-col :span="7">{{ item.handlerCmnt }}</el-col>
                </el-row>
              </li>
            </ul>
          </div>
        </el-form>
      </div>
    </div>
    <div class="drawer-btns" v-if="editable">
      <el-button @click="handleCancel">取消</el-button>
      <el-button type="warning" size="medium" @click="handleReject">驳回</el-button>
      <el-button type="primary" size="medium" @click="save">保存</el-button>
      <el-button type="primary" size="medium" @click="handleSubmit">提交</el-button>
      <el-button
        :type="tagInfo.tagStatus === 1 ? 'info' : 'primary'"
        size="medium"
        @click="handleChangeStatus"
        v-if="isChange"
      >
        {{ tagInfo.tagStatus === 1 ? '停用标签' : '启用标签' }}
      </el-button>
    </div>
    <require-confirm ref="requireConfirm" @callback="confirm"></require-confirm>
    <tag-reject ref="tagReject" @callback="confirm"></tag-reject>
    <user-selection ref="userSelection" :nodeId="40" @callback="confirmUser"></user-selection>
    <tag-text-dialog ref="tagTextDialog"></tag-text-dialog>
  </div>
</template>

<script>
import tagReject from '../../../../components/tag-reject-selection'
import userSelection from '../../../../components/tag-user-selection'
import requireConfirm from '../components/require-confirm'
export default {
  props: {
    drawerType: {
      type: String,
      default: 'add'
    }
  },
  components: {
    tagReject,
    userSelection,
    requireConfirm
  },
  data() {
    return {
      editable: false,
      loading: false,
      platforms: [],
      requirerList: [],
      isChange: false,
      changeTag: false,
      tagList: [],
      depts: [],
      responsers: [],
      editForm: {
        tagId: '',
        tagNm: '',
        appPlfmIds: [],
        tagStory: '',
        bizStmt: '',
        itStmt: '',
        tagKind: '',
        hqTag: '',
        identifierFlag: 1,
        clientStatRange: '',
        requireScheduleDt: '',
        respTeamId: '',
        responserId: '',
        requirerNm: '',
        requirerNnm: '',
        handlerId: ''
      },
      tagInfo: {
        tagStatus: 1,
        requireStatusList: []
      },
      editFormRules: {
        hqTag: [{ validator: this.$checkBoolNum('统计粒度必须选择'), trigger: 'change' }],
        clientStatRange: [{ validator: this.$checkBoolNum('客户统计范围必须选择'), trigger: 'change' }],
        tagNm: [
          { required: true, message: '标签名称不能为空', trigger: 'blur' },
          { max: 100, message: '标签名称不能超过100个字符', trigger: 'blur' }
        ],
        appPlfmIds: [{ required: true, message: '至少选择一项', trigger: 'change' }],
        tagStory: [
          { required: true, message: '标签故事不能为空', trigger: 'blur' },
          { max: 1000, message: '标签故事不能超过1000个字符', trigger: 'blur' }
        ],
        bizStmt: [
          { required: true, message: '业务口径不能为空', trigger: 'blur' },
          { max: 1000, message: '业务口径不能超过1000个字符', trigger: 'blur' }
        ],
        tagKind: [{ required: true, message: '标签类别必须选择', trigger: 'change' }],
        respTeamId: [{ required: true, message: '责任团队必须选择', trigger: 'change' }],
        requireScheduleDt: [{ required: true, message: '计划排版不能为空', trigger: 'change' }]
      }
    }
  },
  watch: {
    changeTag(val) {
      if (!val) {
        this.clearForm()
        this.editable = true
      }
    },
    'editForm.respTeamId'() {
      this.editForm.responserId = ''
      this.responsers = []
      this.getResponsers()
    },
    'editForm.tagId'(val) {
      if (val && this.changeTag) this.getInfo()
    }
  },
  methods: {
    init(tag) {
      this.initTag(tag)
      this.getDelpt()
      this.getPlatforms()
    },
    getSelections() {
      this.editable = true
      this.getPlatforms()
    },
    getPlatforms() {
      this.$ajax({
        url: this.$ajax.setUrl('ast/astAppPlatform/getAll'),
        method: 'get',
        params: this.$ajax.setParams()
      }).then(({ data }) => {
        if (data && data.code === '0') {
          this.platforms = data.data
        } else {
          this.$message.error(data.data || data.msg)
        }
      })
    },
    getDelpt() {
      this.$ajax({
        url: this.$ajax.setUrl('auth/authDeptMgr/all'),
        method: 'get',
        params: this.$ajax.setParams()
      }).then(({ data }) => {
        if (data && data.code === '0') {
          this.depts = data.data
        } else {
          this.$message.error(data.data || data.msg)
        }
      })
    },
    getResponsers() {
      this.$ajax({
        url: this.$ajax.setUrl('auth/authUser/getUserByDeptId'),
        method: 'get',
        params: this.$ajax.setParams({
          deptId: this.editForm.respTeamId
        })
      }).then(({ data }) => {
        if (data && data.code === '0') {
          this.responsers = data.data
        } else {
          this.$message.error(data.data || data.msg)
        }
      })
    },
    getInfo() {
      this.loading = true
      this.$ajax({
        url: this.$ajax.setUrl(`ast/astTagRequireModify/${this.editForm.tagId}`),
        method: 'get',
        params: this.$ajax.setParams()
      }).then(({ data }) => {
        if (data && data.code === '0') {
          this.initTag(Object.assign({}, data.data, { isChange: true }))
        } else {
          this.$message.error(data.data || data.msg)
        }
        this.loading = false
      })
    },
    initTag(tag) {
      this.isChange = tag.isChange
      this.changeTag = tag.isChange
      this.editable = tag.isModify
      this.editForm.tagId = tag.tagId
      this.editForm.tagKind = tag.tagKindId === 0 ? '' : tag.tagKindId
      this.editForm.hqTag = tag.hqTagId
      this.editForm.clientStatRange = tag.clientStatRangeId
      this.editForm.requireScheduleDt = tag.requireScheduleDt
        ? tag.requireScheduleDt.substring(0, 7)
        : tag.requireScheduleDt
      this.editForm.handlerId = ''
      this.editForm.tagNm = tag.tagNm
      this.editForm.tagStory = tag.tagStory
      this.editForm.bizStmt = tag.bizStmt
      this.editForm.itStmt = tag.itStmt
      this.editForm.identifierFlag = tag.identifierFlag
      this.editForm.appPlfmIds = []
      tag.appPlfms.forEach(v => this.editForm.appPlfmIds.push(v.appPlfmId.toString()))
      this.editForm.respTeamId = tag.respTeamId || ''
      this.editForm.requirerNm = tag.requirerNm
      this.editForm.requirerNnm = tag.requirerNnm
      this.tagInfo = {
        tagStatus: tag.tagStatus,
        requireStatusList: tag.requireStatusList
      }
      this.$nextTick(() => {
        this.editForm.responserId = tag.responserId || ''
        this.$refs['editForm'].clearValidate()
      })
    },
    handleCancel() {
      this.clearForm()
      this.$emit('close')
    },
    handleChangeStatus() {
      this.$ajax({
        url: this.$ajax.setUrl('ast/astDataAsset/updateAssetStatus'),
        method: 'post',
        data: this.$ajax.setData({
          assetId: this.editForm.tagId,
          status: Number(!this.tagInfo.tagStatus),
          modifyReason: '标签改造中'
        })
      }).then(({ data }) => {
        if (data && data.code === '0') {
          this.$message.success(data.msg)
          this.tagInfo.tagStatus = Number(!this.tagInfo.tagStatus)
        } else {
          this.$message.error(data.msg)
        }
      })
    },
    getTagNm(query) {
      if (!query) {
        this.tagList = []
        return
      }
      this.$ajax({
        url: this.$ajax.setUrl(`ast/astTagRequireModify/getTagNmList/${query}`),
        method: 'get',
        params: this.$ajax.setParams()
      }).then(({ data }) => {
        if (data && data.code === '0') {
          this.tagList = data.data
        } else {
          this.$message.error(data.data || data.msg)
        }
      })
    },
    clearForm() {
      this.editable = false
      this.loading = false
      this.isChange = false
      this.changeTag = false
      this.requirerList = []
      this.tagList = []
      this.editForm = {
        tagId: '',
        tagKind: '',
        hqTag: '',
        clientStatRange: '',
        requireScheduleDt: '',
        tagNm: '',
        appPlfmIds: [],
        tagStory: '',
        bizStmt: '',
        itStmt: '',
        identifierFlag: 1,
        respTeamId: '',
        responserId: '',
        requirerNm: '',
        requirerNnm: '',
        handlerId: ''
      }
      this.tagInfo = {
        tagStatus: 1,
        requireStatusList: []
      }
      this.$refs['editForm'].clearValidate()
    },
    save() {
      this.$refs['editForm'].validate(valid => {
        if (valid) {
          this.loading = true
          let url = this.isChange
            ? 'ast/astTagRequireModify/clarifyProcSave'
            : 'ast/astTagRequireManager/clarifyProcSave'
          let itStmt = new Buffer(this.editForm.itStmt).toString('base64')
          this.$ajax({
            url: this.$ajax.setUrl(url),
            method: 'post',
            data: this.$ajax.setData({
              hqTag: this.editForm.hqTag,
              clientStatRange: this.editForm.clientStatRange,
              requireScheduleDt:
                this.editForm.requireScheduleDt && this.editForm.requireScheduleDt.split('-').length <= 2
                  ? this.editForm.requireScheduleDt + '-01'
                  : this.editForm.requireScheduleDt,
              tagId: this.editForm.tagId,
              tagKind: this.editForm.tagKind,
              appPlfmIds: this.editForm.appPlfmIds,
              itStmt: itStmt,
              bizStmt: this.editForm.bizStmt,
              tagNm: this.editForm.tagNm,
              tagStory: this.editForm.tagStory,
              identifierFlag: this.editForm.identifierFlag,
              respTeamId: this.editForm.respTeamId,
              responserId: this.editForm.responserId
            })
          }).then(({ data }) => {
            if (data && data.code === '0') {
              this.editForm.tagId = data.data
              this.$message.success(data.msg)
            } else {
              this.$message.error(data.data || data.msg)
            }
            this.loading = false
          })
        }
      })
    },
    submit() {
      let url = this.isChange
        ? 'ast/astTagRequireModify/clarifyProcSubmit'
        : 'ast/astTagRequireManager/clarifyProcSubmit'
      let itStmt = new Buffer(this.editForm.itStmt).toString('base64')
      this.$ajax({
        url: this.$ajax.setUrl(url),
        method: 'post',
        data: this.$ajax.setData({
          hqTag: this.editForm.hqTag,
          clientStatRange: this.editForm.clientStatRange,
          requireScheduleDt:
            this.editForm.requireScheduleDt && this.editForm.requireScheduleDt.split('-').length <= 2
              ? this.editForm.requireScheduleDt + '-01'
              : this.editForm.requireScheduleDt,
          tagId: this.editForm.tagId,
          tagKind: this.editForm.tagKind,
          appPlfmIds: this.editForm.appPlfmIds,
          itStmt: itStmt,
          bizStmt: this.editForm.bizStmt,
          tagNm: this.editForm.tagNm,
          tagStory: this.editForm.tagStory,
          identifierFlag: this.editForm.identifierFlag,
          respTeamId: this.editForm.respTeamId,
          responserId: this.editForm.responserId,
          handlerId: this.editForm.handlerId
        })
      }).then(({ data }) => {
        if (data && data.code === '0') {
          this.$refs.requireConfirm.showDialog()
        } else {
          this.$message.error(data.data || data.msg)
        }
        this.loading = false
      })
    },
    handleSubmit() {
      this.$refs['editForm'].validate(valid => {
        if (valid) {
          this.loading = true
          this.$refs.userSelection.showDialog()
        }
      })
    },
    confirmUser(handlerId) {
      if (handlerId) {
        if (this.reassign) {
          this.changeHandler(handlerId)
        } else {
          this.editForm.handlerId = handlerId
          this.submit()
        }
      } else {
        this.reassign = false
        this.loading = false
      }
    },
    handleReject() {
      this.$refs.tagReject.showDialog(this.editForm.tagId, this.isChange)
    },
    confirm() {
      this.$emit('callback')
      this.clearForm()
    },
    showDialog(name) {
      let info = {
        title: '',
        content: this.tagInfo[name]
      }
      switch (name) {
        case 'tagStory':
          info.title = this.tagInfo.tagNm + '---标签故事'
          break
        case 'bizStmt':
          info.title = this.tagInfo.tagNm + '---业务口径'
          break
        case 'itStmt':
          info.title = this.tagInfo.tagNm + '---技术口径'
          break
      }
      this.$refs.tagTextDialog.showDialog(info)
    }
  }
}
</script>

<style lang="scss">
.require-review {
  .drawer-content {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  .tag-name {
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    position: relative;
    .el-input__inner {
      background-color: #fbf5e5 !important;
      border: 1px dashed #faeace;
    }
    .el-select {
      .el-input__inner {
        border-radius: 0;
      }
    }
  }
  .el-switch {
    margin-top: 8px;
  }
  .info {
    margin-left: -20px;
    margin-right: -20px;
    margin-top: 30px;
    padding: 10px 20px;
    background-color: rgba($color: #03a9f4, $alpha: 0.1);
  }
  .row1 {
    height: 90px;
    padding: 0 0 10px 200px;
    color: #fff;
    border-radius: 10px;
    border-top-right-radius: 0;
    margin-bottom: 20px;
    line-height: normal;
    box-shadow: #eee 0 0 10px;
    overflow: hidden;
    position: relative;
    .row1-left {
      width: 200px;
      height: 100%;
      line-height: 90px;
      padding: 0 0 10px 20px;
      position: absolute;
      left: 0;
      font-size: 20px;
      svg {
        width: 40px;
        height: 40px;
        vertical-align: middle;
        margin: -10px 5px 0 0;
      }
    }
    .row1-content {
      height: 100%;
      text-align: left;
      padding: 10px;
      padding-left: 20px;
      .el-form-item,
      .el-form-item__content {
        height: 100%;
        line-height: 25px;
      }
      .el-radio-group {
        height: 100%;
        overflow-y: auto;
      }
      .el-radio {
        margin-top: 10px;
      }
      &.hq-content .el-radio {
        margin-top: 25px;
      }
      .el-select {
        margin-top: 15px;
        .el-input {
          margin-top: 0;
        }
      }
      .el-input {
        margin-top: 15px;
      }
      .el-switch {
        margin-top: 25px;
      }
    }
    .content {
      font-size: 20px;
      margin-bottom: 10px;
    }
  }
  .el-select {
    .el-input__inner {
      color: $theme-color;
      border-style: dashed;
      border-radius: 20px;
    }
    .el-input .el-select__caret {
      color: $theme-color;
    }
  }
  .card {
    margin-bottom: 20px;
    text-align: center;
    .title {
      margin: 0 0 20px 0;
    }
    .content {
      height: 60px;
      color: $theme-color;
      position: relative;
      &:after {
        width: 100%;
        height: 3px;
        content: '';
        background-color: #666bc6;
        position: absolute;
        left: 0;
        bottom: -13px;
      }
    }
    &.advise .content {
      height: 125px;
    }
  }
  .ol-card {
    padding: 10px 20px;
    margin-bottom: 10px;
    box-shadow: #eee 0 0 10px;
    background-color: rgba($color: #f7fbff, $alpha: 0.8);
    position: relative;
    &:before {
      height: 3px;
      content: '';
      background-color: #e4e3e8;
      position: absolute;
      left: 0;
      bottom: 0;
      right: 0;
    }
    &:after {
      height: 3px;
      content: '';
      background-color: #666bc6;
      position: absolute;
      left: 10px;
      bottom: 0;
      right: 10px;
    }
    .card-title {
      font-size: 16px;
      font-weight: bold;
      color: $theme-color;
      line-height: 40px;
      text-align: center;
    }
    .card-content {
      height: 100px;
      .card-item {
        display: inline-block;
        margin: 0 10px 10px 0;
        padding: 5px 10px;
        color: $theme-color;
        border: 1px dashed $theme-color;
        border-radius: 2px;
        svg {
          margin-right: 5px;
        }
      }
    }
  }
  .tag-status-list li {
    background-color: rgba($color: #f7fbff, $alpha: 0.8);
  }
  .row2 {
    margin-bottom: 20px;
    padding: 0 0 0 200px;
    border-bottom: 0;
    position: relative;
    &:before {
      width: 3px;
      height: 50px;
    }
    &:after {
      width: 3px;
      height: 30px;
    }
    .title {
      width: 200px;
      color: $theme-color;
      margin: 2px 0 18px 0;
      text-align: center;
      position: absolute;
      left: 0;
      svg {
        width: 50px;
        height: 50px;
        margin: 20px 0 10px 0;
      }
    }
    .content {
      height: auto;
      min-height: 150px;
      padding: 15px 15px 0 15px;
      text-align: left;
      border-left: 3px solid $border-color;
      position: relative;
      .el-form-item,
      .el-form-item__content {
        height: 100%;
        line-height: 25px;
      }
      .el-checkbox-group {
        height: 100%;
        overflow-y: auto;
      }
      .el-form-item {
        padding-bottom: 10px;
      }
      .el-form-item__error {
        top: calc(100% - 12px);
      }
      &:after {
        width: 3px;
        height: auto;
        content: '';
        position: absolute;
        top: 10px;
        left: -3px;
        bottom: 10px;
      }
      &.purpose:after {
        background-color: #a18cf1;
      }
      &.blue:after {
        background-color: #23ace3;
      }
    }
  }
  .require-name {
    display: inline-block;
    color: #000;
    margin: 20px 0 0 15px;
  }
}
</style>
